package com.zzzzzz.posts;

import org.springframework.stereotype.Repository;

import com.zzzzzz.BaseDao;

@Repository
public class PostCountDao extends BaseDao{
	private final static String ADD = "insert into post_count(post_id,looks,loves) values(:postId, :looks, :loves)";
	private final static String EDIT = "update post_count set looks = looks + :looksChange, loves = loves + :lovesChange where post_id = :postId";
	
	public void add(PostCount postCount){
		this.update(ADD, postCount);
	}
	
	public void edit(PostCountForm postCountForm){
		this.update(EDIT, postCountForm);
	}
}
